<html>
<head>
<title>Testing Page</title>

<script type="text/javascript" src="../lucidcore.js"></script>
<script type="text/javascript">

function load()
{
}

function runTheTests()
{
    try
    {

        function Thing1() {
            this.hello = function()
            {
                alert("aloha: " + this.foo);
            }
        }

        Thing1.prototype.hello = function()
        {
            alert("hello");
        }


    //    function Thing2() {}
    ////    Thing1.prototype = new Thing2();
    //    Thing1.prototype = {};
    //    var a = new Thing1();

        var a = {
            foo: "bar"
        }

        a.constructor = Thing1;
        a.__proto__ = Thing1.prototype;
        a.constructor();

//        alert( a.constructor ); // returns Thing2
        alert( lucid_typeof(a) ); // returns Thing2
        a.hello();
    }
    catch( e )
    {
        alert( e );
    }
}

</script>

</head>
<body bgcolor="#d0d0d0" onload="load()">
<!--
<p><a href="../../../../build/lucidity.xpi">lucidity.xpi</a></p>
<p><a href="http://www.getfirebug.com">Firebug</a></p>
<p><a href="sample/omega/text1-bob2alice-eo.asc">encryted message</a></p>
-->
<form name="testform" action="test.html">
    <input onclick="runTheTests()" type="button" value="Run Tests"/>
    <hr/>
    <textarea id="fooarea" name="fooarea" rows="10" cols="80"></textarea>
    <hr/>
</form>

<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.
</p>

</body>
</html>
